package pl.ydp.components.mathcell.mathrecognizer.geometry.extractor.features
{
	import flash.geom.Point;
	
	public class LoopDiameter
	{
		
		public function LoopDiameter(_begin:Object = null, _end:Object = null){
			
			if (_begin is Point  &&  _end is Point){
				begin = _begin as Point;
				end = _end as Point;
			} else {
				begin = new Point;
				end = new Point;
			}
			
			length = Point.distance(begin, end);
			
			center = new Point((begin.x+end.x)/2, (begin.y+end.y)/2);
			
		}
		
		public var begin:Point;
		public var end:Point;
		
		public var length:Number;
		
		public var center:Point;
	}
}